package ru.compscicenter.java.calc.operations;

public class LongOperations implements Operations<Long>{

	@Override
	public Long parese(String s) {
		long r = 0;
		for (char c : s.toCharArray()) {
			r = r * 10 + c - '0';
		}
		return r;
	}


	@Override
	public Long plus(Long a, Long b) {
		return a + b;
	}

	@Override
	public Long minus(Long a, Long b) {
		return a - b;
	}

	@Override
	public Long mul(Long a, Long b) {
		return a * b;
	}

	@Override
	public Long div(Long a, Long b) {
		return a / b;
	}

}
